<template>
  <div id="slider">
      <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">slider1</div>
            <div class="swiper-slide">slider2</div>
            <div class="swiper-slide">slider3</div>
        </div>
        </div>
  </div>
</template>

<script>
    // 轮播组件
    //require('../../assets/css/personalcenter.scss'); //引入的scss
    import swiper from 'swiper'
    export default {
        name: 'slider', //组件的名字
        data() {
            return { //数据
                msg: 'test router2.0'
            }
        },
        methods: { //方法
            initswiper(){
                var mySwiper = new Swiper('.swiper-container', {
                    autoplay: 5000,//可选选项，自动滑动
                })
            }
        },
        computed: { //计算 用来引入vuex里面state

        },
        mounted: function() { //组件加载完成
            this.initswiper()
        },
        watch: { //健康某个数据变化后触发某个事件

        },
        destroyed: function() { //离开这个组件



        }
    }
</script>
<style scoped>

</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->